package com.share.design.interpreter.demo01;

/**
 * @author caifan
 * @since 2022/11/13
 */
public class TerminalExpression implements Expression {

    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpreter(String con) {
        if(con.contains(data)) {
            return true;
        } else {
            return false;
        }
    }
}
